//
//  MZY_designerText.m
//  FullHouse
//
//  Created by dllo on 16/1/26.
//  Copyright © 2016年 yy. All rights reserved.
//

#import "MZY_designerText.h"

#define HORIZONTAL [UIScreen mainScreen].bounds.size.width / 414
#define VERTICAL [UIScreen mainScreen].bounds.size.height / 736

@implementation MZY_designerText

- (void)dealloc
{
    [self.locationContentLabel release];
    [self.locationLabel release];
    [self.priceContentLabel release];
    [self.priceLabel release];
    [self.woekContentLabel release];
    [self.workLabel release];
    [self.allContentButton release];
    [super dealloc];
}

- (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        [self createView];
    }
    return self;
}

- (void)createView{
    self.locationLabel = [[UILabel alloc]init];
    [self.contentView addSubview:self.locationLabel];
    [self.locationLabel release];
    
    self.locationContentLabel = [[UILabel alloc]init];
    [self.contentView addSubview:self.locationContentLabel];
    [self.locationContentLabel release];
    
    self.priceLabel = [[UILabel alloc]init];
    [self.contentView addSubview:self.priceLabel];
    [self.priceLabel release];
    
    self.priceContentLabel = [[UILabel alloc]init];
    [self.contentView addSubview:self.priceContentLabel];
    [self.priceContentLabel release];
    
    self.workLabel = [[UILabel alloc]init];
    [self.contentView addSubview:self.workLabel];
    [self.workLabel release];
    
    self.woekContentLabel = [[UILabel alloc]init];
    [self.contentView addSubview:self.woekContentLabel];
    [self.woekContentLabel release];
    
    self.allContentButton = [UIButton buttonWithType:UIButtonTypeSystem];
    [self.contentView addSubview:self.allContentButton];
}

- (void)layoutSubviews{
    [super layoutSubviews];
    self.locationLabel.frame = CGRectMake(10, 10, 100, 20);
    self.locationContentLabel.frame = CGRectMake(110, 10, 100, 20);
    self.priceLabel.frame = CGRectMake(10, 50, 80, 20);
    self.priceContentLabel.frame = CGRectMake(110, 50, 200, 20);
    self.workLabel.frame = CGRectMake(10, 90, 80, 20);
    self.woekContentLabel.frame = CGRectMake(110, 90, 80, 20);
    self.allContentButton.frame = CGRectMake(150 * HORIZONTAL, 120, 100, 50);
}

@end
